﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SimpleModel.Model;

namespace SimpleModel.Mapping
{
    public class studentMap : EntityTypeConfiguration<student>
    {
        public studentMap()
        {
            ToTable("student");
            HasRequired(p => p.classinfo).WithMany(t => t.students).HasForeignKey(s=>s.classinfo_id);
        }
    }
}
